#include <iostream>

using namespace std;

int res;

int main()
{
	int n;
	cin >> n;
	
	bool flag = false;
	
	if (n < 0)
	{
		flag = true;
		n = -n;
	}
	
	while (n)
	{
		res = res * 10 + n % 10;
		n /= 10; 
		
	}
	
	if (flag) res = - res;
	
	cout << res << endl;
	
	return 0;
} 

